<?php
use App\Models\Theme;

Theme::addCss("/admin/default/css/user/index.css");
Theme::addJs("/admin/default/js/user/index.js");
Theme::output();
?>
<meta name="_token" content="{{csrf_token()}}">
@extends('admin.default.layouts.app')

@section('content')
    <Tabs type="card">
        <Tab-pane label="用户列表">
            <!--搜索-->
            <i-form v-ref:form-inline inline>
                <Form-item prop="name">
                    <i-input type="text" :value.sync="searchForm.name" placeholder="用户名">
                    </i-input>
                </Form-item>
                <Form-item prop="email">
                    <i-input type="text" :value.sync="searchForm.email" placeholder="邮箱">
                    </i-input>
                </Form-item>
                <Form-item>
                    <i-button type="primary" @click="handSearch('searchForm')">搜索</i-button>
                </Form-item>
            </i-form>
            <!--table数据-->
            <i-table border :content="$root" :columns="columns" :data="userList"></i-table>
            <!--分页-->
            <div class="pagination-right">
                <Page :total="totalPage" :current="currentPage" :page-size="2" show-total show-elevator
                      v-on:on-change="handleCurrentChange"></Page>
            </div>
        </Tab-pane>
        <Tab-pane label="标签二">活跃用户</Tab-pane>
        <Tab-pane label="标签三">禁止用户</Tab-pane>
    </Tabs>
    <!--删除-->
    <Modal :visible.sync="deleteDilog" width="360">
        <p slot="header" style="color:#f60;text-align:center">
            <Icon type="information-circled"></Icon>
            <span>删除确认</span>
        </p>
        <div style="text-align:center">
            <p>删除后无法恢复，是否继续删除？</p>
        </div>
        <div slot="footer">
            <i-button type="error" size="large" long :loading="modal_loading" @click="delSure">删除</i-button>
        </div>
    </Modal>
@endsection